package com.fzl.spring_chatroom.model.mapper;

import com.fzl.spring_chatroom.model.dao.FriendRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FriendRequestMapper {
    int insert(FriendRequest request);

    List<FriendRequest> selectPendingByUserId(@Param("userId") Integer userId);

    int updateStatus(@Param("id") Integer id, @Param("status") String status);

    FriendRequest selectPending(@Param("fromUserId") Integer fromUserId, @Param("toUserId") Integer toUserId);

    FriendRequest selectById(@Param("id") Integer id);
}